﻿using System;


namespace advadev.CanOpen
{

    /// <summary>
    /// Represents a can open error code
    /// </summary>
    public class CanOpenErrorCode
    {

        /// <summary>
        /// Initializes a new instance of the CanOpenErrorCode class by the
        /// given parameter
        /// </summary>
        /// <param name="errorCode">
        /// Error code
        /// </param>
        public CanOpenErrorCode(UInt16 errorCode)
        {
            ErrorCode = errorCode;
        }


        /// <summary>
        /// Gets or sets the error code
        /// </summary>
        public UInt16 ErrorCode
        {
            get;
            set;
        }

        /// <summary>
        /// Gets a localized description for the error code
        /// </summary>
        public string LocalizedDescription
        {
            get
            {
                // -->> HACK: implement localized description
                return ErrorCode.ToString();
                // <<-- HACK
            }
        }

    }

}
